package Eyjafjalla.card.dolly;

import Eyjafjalla.card.AbstractEyjafjallaCard;
import Eyjafjalla.modcore.ColorEnum;
import Eyjafjalla.power.GiveRedCloudPower;
import com.megacrit.cardcrawl.actions.common.ApplyPowerAction;
import com.megacrit.cardcrawl.actions.common.GainBlockAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.localization.CardStrings;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import com.megacrit.cardcrawl.powers.FlameBarrierPower;

public class LTTQB_Eyjafjalla extends AbstractEyjafjallaCard {
    public static final String ID = "LTTQB_Eyjafjalla";
    private static final CardStrings cardStrings;

    public LTTQB_Eyjafjalla(){
        super(ID, cardStrings.NAME,1,cardStrings.DESCRIPTION,CardType.SKILL, ColorEnum.Eyjafjalla_Dolly_COLOR,CardRarity.UNCOMMON,CardTarget.SELF);
        setDolly();
        this.baseBlock = 8;
        this.block = 8;
        setFireDescription(cardStrings.EXTENDED_DESCRIPTION[0]);
    }

    @Override
    public AbstractCard makeCopy() {
        return new LTTQB_Eyjafjalla();
    }

    @Override
    public void use(AbstractPlayer p, AbstractMonster m) {
        addToBot(new GainBlockAction(p,block));
        this.addToBot(new ApplyPowerAction(p, p, new GiveRedCloudPower(p, isFire()?4:2), isFire()?4:2));
    }

    @Override
    public void upgrade() {
        if(!this.upgraded){
            upgradeName();
            upgradeBlock(4);
        }
    }

    static {
        cardStrings = CardCrawlGame.languagePack.getCardStrings(ID);
    }
}
